﻿@{
    ViewBag.Title = "EditMembers";
    Layout = "~/Views/Shared/_Layout.cshtml";
}
<section id="content" role="main">
            
                <header>
                    <div id="proj-config-return-link" class="ops-cont">
        <ul class="ops">
            <li>
                <a id="back-lnk" class="back-to-proj-config button first last" href="/plugins/servlet/project-config/AN/summary"><span class="icon icon-back"><span>Back to project: Angel</span></span>Back to project: Angel</a>
            </li>
        </ul>
    </div>
<h1 id="admin-page-heading">Groups</h1>
                </header>
            
            <div class="content-container">
                

                <div class="content-body aui-panel">
                    

<p><a href="/secure/admin/user/GroupBrowser.jspa"><< Return to view all groups</a></p>

<form action="BulkEditUserGroups.jspa" method="post" name="jiraform" onsubmit="if (this.submitted) return false; this.submitted = true; return true"  >

	
	<table class="jiraform maxWidth" 
    >
	

	
	<tr class="titlerow">
		<td colspan="2" class="jiraformheader">
        
        <h3 class="formtitle">Bulk Edit Group Members</h3>
        
        </td>
	</tr>
	
	
	<tr class="descriptionrow">
		<td colspan="2" class="jiraformheader">
            <div class="desc-wrap">
        This page allows you to edit the user memberships for each group.
        <p>
            You can add to and remove users from multiple groups at a time. When selecting multiple groups please note:
        </p>
        <ul>
            <li>
                All the common users in the selected groups are displayed under the 'All' label and the remaining disparate users are displayed under the label with its group name.
            </li>
            <li>
                <strong>Removing Users</strong> - Removing user(s) listed in the 'All' section will remove the selected user(s) from all of the selected groups. However if user(s) are selected under a specific group name(s), the selected user(s) will be removed from the group its listed under.
            </li>
            <li>
                <strong>Adding Users</strong> - All user(s) to be added are added to all of the selected group(s).
            </li>
        </ul>
        <p>
        <strong>Step 1:</strong> Select group(s) to edit and refresh the members list<br>
        <strong>Step 2:</strong> Select users to leave OR join the selected group(s) and click on the corresponding button
        </p>
    </div>
        </td>
	</tr>

    <tr>
    <td>
        
        <table class="aui bulk-edit-user-groups">
            <thead>
                <tr>
                    <th width="33%">
                        Selected 1 of 4 Groups
                    </th>
                    <th width="33%">
                    
                        3 Group Member(s)
                    
                    </th>
                    <th width="33%">
                        Add members to selected group(s)
                    </th>
                </tr>
            </thead>
            <tbody>
                <tr class="butt-row">
                    <td>
                        &nbsp;
                    </td>
                    <td>
                        <input class="aui-button" name="unassign" type="submit" value="Leave &gt;&gt;">
                    </td>
                    <td>
                        <input class="aui-button" name="assign" type="submit" value="&lt;&lt; Join">
                    </td>
                </tr>
                <tr class="totals">
                    <td>
                        <div class="field-group">
                            <select id="selectedGroupsStr" name="selectedGroupsStr" multiple size="4">
                                
                                    <option selected value="Angel Group">Angel Group</option>
                                
                                    <option  value="jira-administrators">jira-administrators</option>
                                
                                    <option  value="jira-developers">jira-developers</option>
                                
                                    <option  value="jira-users">jira-users</option>
                                
                            </select>
                            <div id="groupRefreshPanel" name="groupRefreshPanel" class="aui-message info" style="display:none;" onclick="refreshDependentFields();">
                                <span class="aui-icon icon-info"></span>
                                <p>
                                Newly selected group(s) may have different members. <a id="refresh-dependant-fields" href="#" onclick="refreshDependentFields();return false;">Click here</a> to refresh the group members list.
                                </p>
                            </div>
                        </div>
                    </td>
                    <td>
                        <div class="field-group">
                        
                            <select id="usersToUnassign" name="usersToUnassign" multiple size="4">
                                
                                    <optgroup label="Angel Group">
                                        
                                            <option value="anhhoa______Angel Group">
                                                anhhoa
                                            </option>
                                        
                                            <option value="kingdomheartdl______Angel Group">
                                                kingdomheartdl
                                            </option>
                                        
                                            <option value="lac lim______Angel Group">
                                                lac lim
                                            </option>
                                        
                                    </optgroup>
                                
                            </select>
                        </div>
                    </td>
                    
	<td class="fieldValueArea" >
<textarea id="usersToAssignStr" name="usersToAssignStr" cols="40" rows="3"  style="" class="ajs-dirty-warning-exempt"></textarea>
    @Html.ActionLink("Select Users", "SelectUser", "User")
	</td>
                </tr>
            </tbody>
        </table>
        
        
    </td>
    </tr>
	</table>

                </div>
            </div>
        
    </section>
